<template>
  <div class="divider" :class="{'editor-ad-active':data.active}" @click="exposetop($event,data.selfindex)">
    <div class="divider-content">{{data.title}}</div>
    <div class="divider-line"></div>
      <the-asscon :active="data.active" @control="control"/>

  </div>
</template>

<script>
import TheAsscon from "@/components/assCon"

export default {
   props:{
    data:{
      type:Object,
      default:()=>{
        return{
         
        }
      }
    }
  },
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  methods:{
    control(e){
      //1向上 2向下 3删除
      var data ={
          type:e,
          index:this.data.selfindex
      }
        this.$emit("on-contro",data)
    },
    exposetop(e,selfindex){
        this.$emit("queryTop",  {
         offsetTop:e.currentTarget.offsetTop,
         selfindex:selfindex
      })
    }
  },
    components:{
     TheAsscon  
    }
}
</script>
